import Vue from 'vue'
import App from './app'
import router from './router/index.js'
import store from './store/index'
import api from './api/api'
import './assets/reset.css'
import './assets/iconfont.css'
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ViewUI);
Vue.use(ElementUI)
Vue.prototype.$api = api
Vue.prototype.$messageTips = (code, message) => {
  if (code === 0) {
    this.$Message['success']({
      background: true,
      content: message
    })
  } else {
    this.$Message['error']({
      background: true,
      content: message
    })
  }
}

new Vue({
  render:h => h(App),
  router,
  store,
}).$mount('#app')
